plugins {
    id 'java'
    id 'war'
    id 'org.springframework.boot' version '3.2.4'
    id 'io.spring.dependency-management' version '1.1.4'
}

group = 'com.larffxx'
version = '0.0.1-SNAPSHOT'

java {
    sourceCompatibility = '17'
}

repositories {
    maven {
        url 'https://m2.dv8tion.net/releases'
    }
    maven { url "https://jitpack.io" }
    mavenCentral()
}
ext {
    set('springCloudVersion', "2023.0.1")
}

dependencies {
    implementation('javax.xml.bind:jaxb-api:2.3.0')
    implementation 'org.springframework.cloud:spring-cloud-starter-zookeeper-discovery'
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-data-rest'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.apache.kafka:kafka-streams'
    implementation 'org.springframework.kafka:spring-kafka'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
//    implementation 'org.telegram:telegrambots:6.9.7.1'
    implementation 'org.telegram:telegrambots-client:7.2.1'
    implementation 'org.telegram:telegrambots-longpolling:7.2.1'
    compileOnly 'org.projectlombok:lombok'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    runtimeOnly 'org.postgresql:postgresql'
    annotationProcessor 'org.projectlombok:lombok'
    providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.kafka:spring-kafka-test'
}

dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

tasks.named('test') {
    useJUnitPlatform()
}
